﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using EDEX_PurchasePricesLoader;

namespace testConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {

                string path2Files = Properties.Settings.Default.path2Files;
                string IBSConnectionString = Properties.Settings.Default.IBSConnectionString;
                var files = Directory.GetFiles(path2Files, "*.xls", SearchOption.TopDirectoryOnly);

                foreach (var file in files)
                {
                    FileInfo fi = new FileInfo(file);

                    ExcelHelper eh = new ExcelHelper(fi.FullName, IBSConnectionString);
                    eh.LoadFile();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

        }
    }
}
